<template>
    <div>
        <input type="text"
               class="k-input-hidden"
               :required="required"
               :placeholder="placeholderText"
               :value="c"/>
        <k-input-upload v-model="c" :multi="multi"/>
    </div>
</template>

<script>
import KInputUpload from '../../input-upload'
export default {
    name: 'KImage',
    components: { KInputUpload },
    props: {
        value: [String, Number, Array],
        defaultValue: [String, Number, Array],
        required: Boolean,
        options: Array,
        placeholderText: String,
        multi: Boolean,
    },
    computed: {
        c: {
            get() {
                return this.value;
            },
            set(val) {
                this.$emit('input', val);
            }
        }
    },
    methods: {
        // 值修改
        onChangeValue(value) {
            this.$emit('change', value);
        }
    }
}
</script>
